package com.example.yiwei.crm.util;

import android.content.SharedPreferences;
import android.util.Log;

import org.json.JSONException;
import org.json.JSONObject;

/**
 * Created by DHN on 2017/4/26.
 */

public class SC {

   public  JSONObject storage(SharedPreferences sp){
       JSONObject object = new JSONObject();
       try {
           object.put("CID01",sp.getString("CID01",null));
           object.put("CID02",sp.getString("CID02",null));
//           object.put("CID03",sp.getString("CID03",null));
           object.put("UID01",sp.getString("UID01",null));
           object.put("UID02",sp.getString("UID02",null));
           object.put("UID03",sp.getString("UID03",null));
           object.put("UAC01",sp.getString("UAC01",null));
           object.put("UNT01",sp.getString("UNT01",null));
           object.put("admin",sp.getString("admin",null));
           object.put("UNT02",sp.getString("UNT02",null));
           object.put("UNT03",sp.getString("UNT03",null));
           object.put("UAB01",sp.getString("UAB01",null));
           object.put("UAB02",sp.getString("CID02",null));
           object.put("UAC02",sp.getString("UAC02",null));
           object.put("UAB03",sp.getString("UAB03",null));
           object.put("UAA01",sp.getString("UAA01",null));
           object.put("UAC05",sp.getString("UAC05",null));
           object.put("UAB06",sp.getString("UAB06",null));
           Log.d("UAB01",sp.getString("UAB01",null));
           object.put("UAA02",sp.getString("UAA02",null));
           object.put("UAA03",sp.getString("UAA03",null));
           object.put("DEL01",0);
           if (sp.getString("DEPTS",null)!=null){
               object.put("DEPTS",sp.getString("DEPTS",null));
           }


       } catch (JSONException e) {
           e.printStackTrace();
       }
       return object;
   }
}
